<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <meta content="ie=edge" http-equiv="x-ua-compatible"/>
    <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
    <meta content="webkit" name="renderer"/>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
    <title>登 录</title>
    <link rel="stylesheet" th:href="@{/metronic/assets/global/plugins/font-awesome/css/font-awesome.min.css}"
          type="text/css"/>
    <link rel="stylesheet" th:href="@{/metronic/assets/global/plugins/simple-line-icons/simple-line-icons.min.css}"
          type="text/css"/>
    <link rel="stylesheet" th:href="@{/metronic/assets/global/plugins/bootstrap/css/bootstrap.min.css}"
          type="text/css"/>
    <link rel="stylesheet" th:href="@{/metronic/assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css}"
          type="text/css"/>
    <link id="style_components" rel="stylesheet" th:href="@{/metronic/assets/global/css/components.css}"
          type="text/css"/>
    <link rel="stylesheet" th:href="@{/metronic/assets/global/css/plugins.min.css}" type="text/css"/>
    <link rel="stylesheet" th:href="@{/assets/pages/login/css/login.min.css}" type="text/css"/>
    <link rel="stylesheet" th:href="@{/plugins/notyf/notyf.min.css}" type="text/css"/>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        html,
        body {
            height: 100%;
            overflow: hidden;
        }

        #particles {
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: #222 url('/assets/pages/login/images/bg-gride.png');
        }
    </style>
</head>
<body class=" login">
<div id="particles">
    <div class="logo" style="font-size:40px; color:#FFF; margin-top:40px;">通用数据服务平台</div>
    <!-- BEGIN LOGIN -->
    <div class="content" style="z-index: 999">
        <!-- BEGIN LOGIN FORM -->
        <form class="login-form" method="post" th:action="@{/authentication/form}">
            <h3 class="form-title font-green">登 录</h3>
            <!--            th:if="${#httpServletRequest.getAttribute('login') == 1}"-->
            <!--            <div class="alert alert-danger" >-->
            <!--                &lt;!&ndash;<button class="close" data-close="alert"></button> display-hide&ndash;&gt;-->
            <!--                <span> 用户名或账号输入有误. </span>-->
            <!--            </div>-->
            <div class="form-group">
                <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
                <label class="control-label visible-ie8 visible-ie9">Username</label>
                <input autocomplete="off" class="form-control form-control-solid placeholder-no-fix" name="username"
                       placeholder="用户名" required type="text"/></div>
            <div class="form-group">
                <label class="control-label visible-ie8 visible-ie9">Password</label>
                <input autocomplete="off" class="form-control form-control-solid placeholder-no-fix" name="password"
                       placeholder="密码" required type="password"/></div>
            <div class="form-actions">
                <button class="btn green uppercase" id="btn-submit" type="submit">登录</button>
                <label class="rememberme check mt-checkbox mt-checkbox-outline">
                    <input name="remember" type="checkbox" value="1"/>记住我
                    <span></span>
                </label>
            </div>
            <div class="create-account">
                <!--<p>-->
                <!--<span href="javascript:;" id="register-btn" class="uppercase">Create an account</span>-->
                <!--</p>-->
            </div>
        </form>
        <!-- END LOGIN FORM -->
    </div>
    <div class="copyright"> 2019 © 北京艾力泰尔信息技术股份有限公司.</div>
</div>
<!--[if lt IE 9]>
<script th:src="@{/metronic/assets/global/plugins/respond.min.js}"></script>
<script th:src="@{/metronic/assets/global/plugins/excanvas.min.js}"></script>
<script th:src="@{/metronic/assets/global/plugins/ie8.fix.min.js}"></script>
<![endif]-->
<!-- BEGIN CORE PLUGINS -->
<script th:src="@{/metronic/assets/global/plugins/jquery.min.js}" type="text/javascript"></script>
<script th:src="@{/metronic/assets/global/plugins/bootstrap/js/bootstrap.min.js}" type="text/javascript"></script>
<script th:src="@{/metronic/assets/global/plugins/js.cookie.min.js}" type="text/javascript"></script>
<script th:src="@{/metronic/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js}"
        type="text/javascript"></script>
<script th:src="@{/metronic/assets/global/plugins/jquery.blockui.min.js}" type="text/javascript"></script>
<script th:src="@{/metronic/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js}"
        type="text/javascript"></script>
<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script th:src="@{metronic/assets/global/plugins/jquery-validation/js/jquery.validate.min.js}"
        type="text/javascript"></script>
<script th:src="@{metronic/assets/global/plugins/jquery-validation/js/additional-methods.min.js}"
        type="text/javascript"></script>
<!-- <script src="../assets/global/plugins/select2/js/select2.full.min.js" type="text/javascript"></script>
END PAGE LEVEL PLUGINS -->
<!-- BEGIN THEME GLOBAL SCRIPTS -->
<script th:src="@{metronic/assets/global/scripts/app.min.js}" type="text/javascript"></script>
<!-- END THEME GLOBAL SCRIPTS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<!--<script th:src="@{/assets/pages/scripts/login.min.js}" type="text/javascript"></script>-->
<!-- END PAGE LEVEL SCRIPTS -->
<!-- BEGIN THEME LAYOUT SCRIPTS -->
<!-- END THEME LAYOUT SCRIPTS -->
<script th:src="@{/assets/pages/login/js/three.min.js}" type="text/javascript"></script>
<script th:src="@{/assets/pages/login/js/index-canvas.js}" type="text/javascript"></script>
<script th:src="@{/plugins/notyf/notyf.min.js}" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        var notyf = new Notyf();

        $('#clickmewow').click(function () {
            $('#radio1003').attr('checked', 'checked');
        });

        $('.login-form').on('submit', function () {
            var data = {};
            $(this)
                .serializeArray()
                .map(function (item) {
                    data[item.name] = data[item.name] ? data[item.name] + ',' + item.value : item.value;
                });
            $.post($(this).attr('action'), data, function (res) {
                try {
                    var result = JSON.parse(res);
                    if (!result.success) {
                        notyf.alert("用户名或密码不正确");
                    }
                } catch (e) {
                    location.href = '/';
                }
            });

            return false;
        });
    })
</script>
</body>
</html>
